home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 January / macformat-020.iso / Shareware City / Developers / OutOfPhase1.01Source / OutOfPhase Folder / AlgoSampList.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-10-01  |  5.3 KB  |  143 lines  |  [TEXT/KAHL]

  1. /* AlgoSampList.h */
  2.  
  3. #ifndef Included_AlgoSampList_h
  4. #define Included_AlgoSampList_h
  5.  
  6. /* AlgoSampList module depends on */
  7. /* MiscInfo.h */
  8. /* Audit */
  9. /* Debug */
  10. /* Definitions */
  11. /* Screen */
  12. /* EventLoop */
  13. /* StringList */
  14. /* Array */
  15. /* Memory */
  16. /* AlgoSampObject */
  17. /* Alert */
  18. /* DataMunging */
  19. /* MainWindowStuff */
  20. /* BufferedFileInput */
  21. /* BufferedFileOutput */
  22. /* Files */
  23. /* Scrap */
  24.  
  25. #include "Screen.h"
  26. #include "EventLoop.h"
  27. #include "MainWindowStuff.h"
  28.  
  29. struct AlgoSampListRec;
  30. typedef struct AlgoSampListRec AlgoSampListRec;
  31.  
  32. /* forward declarations */
  33. struct MainWindowRec;
  34. struct CodeCenterRec;
  35. struct AlgoSampObjectRec;
  36. struct BufferedInputRec;
  37. struct BufferedOutputRec;
  38. struct FileType;
  39.  
  40. /* create a new algorithmic sample list */
  41. AlgoSampListRec*        NewAlgoSampList(struct MainWindowRec* MainWindow,
  42.                                             struct CodeCenterRec* CodeCenter, WinType* ScreenID,
  43.                                             OrdType XLoc, OrdType YLoc, OrdType Width, OrdType Height);
  44.  
  45. /* delete the algorithmic sample list and all of the samples it contains */
  46. void                                DisposeAlgoSampList(AlgoSampListRec* AlgoSampList);
  47.  
  48. /* change the location of the algorithmic sample list in the window */
  49. void                                SetAlgoSampListLocation(AlgoSampListRec* AlgoSampList,
  50.                                             OrdType XLoc, OrdType YLoc, OrdType Width, OrdType Height);
  51.  
  52. /* redraw the list */
  53. void                                AlgoSampListRedraw(AlgoSampListRec* AlgoSampList);
  54.  
  55. /* see if the specified coordinates falls inside the sample list rectangle */
  56. MyBoolean                        AlgoSampListHitTest(AlgoSampListRec* AlgoSampList,
  57.                                             OrdType XLoc, OrdType YLoc);
  58.  
  59. /* handle a mouse down event for the algorithmic sample list */
  60. void                                AlgoSampListDoMouseDown(AlgoSampListRec* AlgoSampList,
  61.                                             OrdType XLoc, OrdType YLoc, ModifierFlags Modifiers);
  62.  
  63. /* called when the window becomes active */
  64. void                                AlgoSampListBecomeActive(AlgoSampListRec* AlgoSampList);
  65.  
  66. /* called when the window becomes inactive */
  67. void                                AlgoSampListBecomeInactive(AlgoSampListRec* AlgoSampList);
  68.  
  69. /* called when a selection is made in another list, so that this list */
  70. /* is deselected */
  71. void                                AlgoSampListDeselect(AlgoSampListRec* AlgoSampList);
  72.  
  73. /* check to see if there is a selection in this list */
  74. MyBoolean                        AlgoSampListIsThereSelection(AlgoSampListRec* AlgoSampList);
  75.  
  76. /* check to see if any of the algo samples contained in this list need */
  77. /* to be saved */
  78. MyBoolean                        DoesAlgoSampListNeedToBeSaved(AlgoSampListRec* AlgoSampList);
  79.  
  80. /* open an edit window for the selected algorithmic sample */
  81. void                                AlgoSampListOpenSelection(AlgoSampListRec* AlgoSampList);
  82.  
  83. /* create a new algorithmic sample and open a window for it */
  84. void                                AlgoSampListNewAlgoSamp(AlgoSampListRec* AlgoSampList);
  85.  
  86. /* delete the selected algorithmic sample */
  87. void                                AlgoSampListDeleteSelection(AlgoSampListRec* AlgoSampList);
  88.  
  89. /* delete the explicitly specified algorithmic sample */
  90. void                                AlgoSampListDeleteAlgoSamp(AlgoSampListRec* AlgoSampList,
  91.                                             struct AlgoSampObjectRec* TheAlgoSamp);
  92.  
  93. /* the name of a algorithmic sample has changed, so the name in the scrolling */
  94. /* list must also be changed */
  95. void                                AlgoSampListAlgoSampNameChanged(AlgoSampListRec* AlgoSampList,
  96.                                             struct AlgoSampObjectRec* TheAlgoSamp);
  97.  
  98. /* look for a specified algorithmic sample.  returns NIL if not found.  the name is */
  99. /* NOT null terminated */
  100. struct AlgoSampObjectRec*    AlgoSampListLookupNamedAlgoSamp(
  101.                                             AlgoSampListRec* AlgoSampList, char* Name);
  102.  
  103. /* remove all data arrays for all algorithmic samples */
  104. void                                AlgoSampListUnbuildAll(AlgoSampListRec* AlgoSampList);
  105.  
  106. /* build all algorithmic sample tables.  returns True if successful. */
  107. MyBoolean                        AlgoSampListMakeUpToDate(AlgoSampListRec* AlgoSampList);
  108.  
  109. /* document's name changed, so we have to update the windows */
  110. void                                AlgoSampListGlobalNameChange(AlgoSampListRec* AlgoSampList,
  111.                                             char* NewFilename);
  112.  
  113. /* read algorithmic sample objects from a file.  returns True if completely successful. */
  114. FileLoadingErrors        AlgoSampListReadData(AlgoSampListRec* AlgoSampList,
  115.                                             struct BufferedInputRec* Input);
  116.  
  117. /* write algorithmic sample objects to a file.  returns True if completely successful. */
  118. FileLoadingErrors        AlgoSampListWriteData(AlgoSampListRec* AlgoSampList,
  119.                                             struct BufferedOutputRec* Output);
  120.  
  121. /* after a file has been saved, this is called to mark all objects as not modified. */
  122. void                                AlgoSampListMarkAllObjectsSaved(AlgoSampListRec* AlgoSampList);
  123.  
  124. /* copy the selected object in the list to the clipboard.  return False if failed. */
  125. MyBoolean                        AlgoSampListCopyObject(AlgoSampListRec* AlgoSampList);
  126.  
  127. /* try to paste the clipboard in as an algorithmic sample object.  returns False if */
  128. /* it failed or the clipboard did not contain an algorithmic sample object. */
  129. MyBoolean                        AlgoSampListPasteObject(AlgoSampListRec* AlgoSampList);
  130.  
  131. /* try to paste an algorithmic sample object from the file */
  132. MyBoolean                        AlgoSampListPasteFromFile(AlgoSampListRec* AlgoSampList,
  133.                                             struct FileType* File);
  134.  
  135. /* find out how many algorithmic samples there are in this list */
  136. long                                AlgoSampListHowMany(AlgoSampListRec* AlgoSampList);
  137.  
  138. /* get an indexed algorithmic sample from the list */
  139. struct AlgoSampObjectRec*    AlgoSampListGetIndexedAlgoSamp(AlgoSampListRec* AlgoSampList,
  140.                                             long Index);
  141.  
  142. #endif
  143.